package main

import (
	"learn-go/object_oriented/animals"
	"learn-go/object_oriented/sayer"
)

func main() {
	var s sayer.Sayer

	s = &animals.Dog{
		Animal: animals.Animal{
			Name: "Yoda",
		},
	}
	s.Say("hello world") // Dog[Yoda] say: hello world
	s.SayHi()            // Animal[Yoda] say: Hi

	s = &animals.Cat{
		Animal: animals.Animal{
			Name: "Jerry",
		},
	}
	s.Say("hello world") // Cat[Jerry] say: hello world
	s.SayHi()            // Cat[Jerry] say: Hi
}
